﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using AndersLiu.Reflector.Program.UI;

namespace AndersLiu.Reflector.Program
{
    /// <summary>
    /// Entry class of the whole program, contains the entry point method.
    /// </summary>
    class ProgramEntry
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var mainForm = args.Length > 0
                ? new MainWindow(args[0])
                : new MainWindow();

            Application.Run(mainForm);
        }

        /// <summary>
        /// Get a string for windows title.
        /// </summary>
        /// <returns></returns>
        public static string GetApplicationTitle()
        {
            return string.Format("{0} {1}", Application.ProductName, Application.ProductVersion);
        }
    }
}
